fix: restore filter behavior on All search tab#14266
Merged
dylanjeffers merged 4 commits intomainfrom May 7, 2026
Merged
Conversation
The profile Contests tab and the upstream useUserHasRemixContest
gate both fetched the global remix-contests list and filtered
client-side by host userId. Hosts whose contests didn't fall on
page 1 of the global list silently rendered as "no contests"
unless we paginated up to a safety cap of 5 pages.
Switch both to the new GET /v1/users/{id}/contests endpoint via a
new useUserRemixContests hook. The has-contest gate becomes a
single pageSize=1 query, and the tab drops the per-row
HostedContestCard filter and the auto-pagination effect.
SDK regen picked up the new users.getContestsByUser method and the
GetContestsByUserStatusEnum.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the desktop change in this branch: drops the global
useAllRemixContests fetch + per-row HostedContestCard host filter +
auto-pagination, replacing them with useUserRemixContests, so the mobile
profile reads from GET /v1/users/{id}/contests directly.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The search-explore-page useEffect had an else-if branch that cleared all URL params except query whenever URL params changed while on the All tab. Since searchParams is in the deps array, setting any filter on the All tab would immediately rewrite the URL and drop the filter. The branch contradicted categories.all.filters (which lists all 7 filters) and the rendered filter UI for the All tab. Removing it. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1247379 to
1cfaacb
Compare
|
Contributor
🌐 Web preview readyPreview URL: https://audius-web-preview-pr-14266.audius.workers.dev Unique preview for this PR (deployed from this branch). |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Filters on the All search tab (genre, mood, BPM, key, premium, downloads, verified) had no effect — clicking a filter would briefly add the param to the URL, then it would immediately disappear. This regression came from the recent header refactor in apps#14181, which introduced an
else ifbranch in theSearchExplorePageURL-sync effect that wiped non-queryparams on every URL change whilecategoryKey === 'all'.Because
searchParamsis in that effect's dep array, the branch fired the moment a filter was set — it would rewrite the URL back to just?query=…and drop the filter the user had just chosen. The branch also contradictscategories.all.filters(which lists all 7 filters) and the filter UI that's rendered for the All tab viacategories[categoryKey].filters.The fix removes the buggy branch from both desktop and mobile SearchExplorePage.tsx. The remaining
ifbranch handles search-input changes correctly; nothing else needed to change.Test plan
I could not start the dev server in this worktree (env-cmd version mismatch — package wants 8.0.2, installed 10.1.0; missing
.env.git; node_modules not linked). Reviewer should smoke-test in the browser:/search, type a query → results appear?query=…&genre=…and stays that way/search🤖 Generated with Claude Code